<!DOCTYPE html>
<html>
<head>
	<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no, minimal-ui"/>
	<meta name="apple-mobile-web-app-capable" content="yes"/>
	<meta name="apple-mobile-web-app-status-bar-style" content="black"/>
	<meta name="format-detection" content="telephone=no, email=no"/>
	<meta charset="UTF-8">
	<title>个人中心</title>
	<link rel="stylesheet" href="themes/css/core.css">
	<link rel="stylesheet" href="themes/css/icon.css">
	<link rel="stylesheet" href="themes/css/home.css">
	<link rel="icon" type="image/x-icon" href="favicon.ico">
	<link href="iTunesArtwork@2x.png" sizes="114x114" rel="apple-touch-icon-precomposed">
	<style type="text/css">

		#scrollBg{ width: 100%; height: 45px; line-height: 45px;background: rgba(251,55,67,0.9); display: none; z-index:111; position: fixed; left: 0; top:0; text-align: center; font-size: 20px; color: #fff; }
	</style>
</head>
<body style="background:#fff">
<div id="vue">
 <div id="scrollBg"></div>
	<header class="aui-header-default aui-header-fixed aui-header-clear-bg " style="background:none; border-bottom:0">
		<a href="javascript:history.back(-1);" class="aui-header-item">
			<i class="aui-icon aui-icon-back-white" id="scrollSearchI" style="display:block"></i>
			<div id="scrollSearchDiv">
				<img src="themes/img/user/head-2.jpg" alt="">
			</div>
		</a>
		<div class="aui-header-center aui-header-center-clear">
			<div class="">

			</div>
		</div>
		<!--<a href="my-set.html" class="aui-header-item-icon">-->
			<!--<i class="aui-icon aui-icon-Sets"></i>-->
		<!--</a>-->

	</header>

	<section class="aui-me-content" style="padding-top:0;">
		<div class="aui-me-content-box">
			<!--<div class="aui-me-content-info"></div> 弧度背景 临时 注释  -->
			<div class="aui-me-content-list">
				<div class="aui-me-content-item">
					<div class="aui-me-content-item-head">
						<div class="aui-me-content-item-img">
							<img v-if="imageUrl!='' && imageUrl!=null && imageUrl!='undefined' " :src="imageUrl" alt="">
							<img v-else src="themes/img/user/head-2.jpg"  alt="">
						</div>
						<div class="aui-me-content-item-title" v-if="accountMobile!='' && accountMobile!=null && accountMobile!='undefined' ">
							{{accountMobile}}
						</div>
						<div class="aui-me-content-item-title"  v-else>
							<a style="position: inherit;" href="./login.html" class="goRank">立即登录  &gt;</a>
						</div>
					</div>
					<!--<div class="aui-me-content-item-text">-->
						<!--<a href="my-orders.html">-->
							<!--<span>98</span>-->
							<!--<span>收藏</span>-->
						<!--</a>-->
						<!--<a href="my-orders.html">-->
							<!--<span>78</span>-->
							<!--<span>关注</span>-->
						<!--</a>-->
						<!--<a href="my-orders.html">-->
							<!--<span>99</span>-->
							<!--<span>足迹</span>-->
						<!--</a>-->
						<!--<a href="my-orders.html">-->
							<!--<span>65</span>-->
							<!--<span>分享</span>-->
						<!--</a>-->
					<!--</div>-->
				</div>
				<!--<div class="aui-me-content-card">-->
					<!--<h3><i class="aui-icon aui-card-me"></i>plus会员</h3>-->
					<!--<a href="my-membership.html">开通享8大权益</a>-->
				<!--</div>-->
				<div class="aui-list-title-btn" @click="loginOut"  style="text-align: center;" v-if="accountMobile!='' && accountMobile!=null && accountMobile!='undefined' ">
					<a href="javascript:void(0);" class="red-color" style="width: 265px;height: 30px;text-align: center;background-color: #8C8C8C;line-height: 28px;font-size: 14px;">
						退出登录
					</a>
				</div>
			</div>
		</div>
		<!--<div class="aui-me-content-order">-->
			<!--<a href="my-order.html" class="aui-well aui-fl-arrow">-->
				<!--<div class="aui-well-bd">我的订单</div>-->
				<!--<div class="aui-well-ft">查看全部</div>-->
			<!--</a>-->
		<!--</div>-->
		<section class="aui-grid-content">
			<!--<div class="aui-grid-row">-->
				<!--<a href="my-order.html" class="aui-grid-row-item">-->
					<!--<i class="aui-icon-large aui-icon-large-sm aui-icon-wallet"></i>-->
					<!--<p class="aui-grid-row-label">待付款</p>-->
				<!--</a>-->
				<!--<a href="my-order.html" class="aui-grid-row-item">-->
					<!--<i class="aui-icon-large aui-icon-large-sm aui-icon-goods"></i>-->
					<!--<p class="aui-grid-row-label">待发货</p>-->
				<!--</a>-->
				<!--<a href="my-order.html" class="aui-grid-row-item">-->
					<!--<i class="aui-icon-large aui-icon-large-sm aui-icon-receipt"></i>-->
					<!--<p class="aui-grid-row-label">待收货</p>-->
				<!--</a>-->
				<!--<a href="my-order.html" class="aui-grid-row-item">-->
					<!--<i class="aui-icon-large aui-icon-large-sm aui-icon-evaluate"></i>-->
					<!--<p class="aui-grid-row-label">待评价</p>-->
				<!--</a>-->
				<!--<a href="my-order.html" class="aui-grid-row-item">-->
					<!--<i class="aui-icon-large aui-icon-large-sm aui-icon-refund"></i>-->
					<!--<p class="aui-grid-row-label">退货退款</p>-->
				<!--</a>-->
			<!--</div>-->
			<div class="aui-dri"></div>
			<!--<div class="aui-grid-row">-->
				<!--<a href="my-invitation.html" class="aui-grid-row-item">-->
					<!--<i class="aui-icon-large aui-icon-large-sm aui-icon-invitation"></i>-->
					<!--<p class="aui-grid-row-label">邀请好友</p>-->
				<!--</a>-->
				<!--<a href="my-sign.html" class="aui-grid-row-item">-->
					<!--<i class="aui-icon-large aui-icon-large-sm aui-icon-signs"></i>-->
					<!--<p class="aui-grid-row-label">签到领币</p>-->
				<!--</a>-->
				<!--<a href="my-coupon.html" class="aui-grid-row-item">-->
					<!--<i class="aui-icon-large aui-icon-large-sm aui-icon-coupon"></i>-->
					<!--<p class="aui-grid-row-label">优惠券</p>-->
				<!--</a>-->
				<!--<a href="my-purchase.html" class="aui-grid-row-item">-->
					<!--<i class="aui-icon-large aui-icon-large-sm aui-icon-fight"></i>-->
					<!--<p class="aui-grid-row-label">我的拼团</p>-->
				<!--</a>-->
				<!--<a href="#" class="aui-grid-row-item">-->
					<!--<i class="aui-icon-large aui-icon-large-sm aui-icon-recommend"></i>-->
					<!--<p class="aui-grid-row-label">商品推手</p>-->
				<!--</a>-->
				<!--<a href="#" class="aui-grid-row-item">-->
					<!--<i class="aui-icon-large aui-icon-large-sm aui-icon-recharge"></i>-->
					<!--<p class="aui-grid-row-label">充值中心</p>-->
				<!--</a>-->
				<!--<a href="#" class="aui-grid-row-item">-->
					<!--<i class="aui-icon-large aui-icon-large-sm aui-icon-help"></i>-->
					<!--<p class="aui-grid-row-label">帮助中心</p>-->
				<!--</a>-->
				<!--<a href="#" class="aui-grid-row-item">-->
					<!--<i class="aui-icon-large aui-icon-large-sm aui-icon-problem"></i>-->
					<!--<p class="aui-grid-row-label">我的问答</p>-->
				<!--</a>-->
				<!--<a href="#" class="aui-grid-row-item">-->
					<!--<i class="aui-icon-large aui-icon-large-sm aui-icon-evaluates"></i>-->
					<!--<p class="aui-grid-row-label">我的评价</p>-->
				<!--</a>-->
				<!--<a href="#" class="aui-grid-row-item">-->
					<!--<i class="aui-icon-large aui-icon-large-sm aui-icon-shares"></i>-->
					<!--<p class="aui-grid-row-label">我的分享</p>-->
				<!--</a>-->
			<!--</div>-->
			<div class="aui-recommend">
				<img src="themes/img/bg/icon-tj3.jpg" alt="">
				<!--<h2>为你推荐</h2>-->
			</div>
			<section class="aui-list-product">
				<div class="aui-list-product-box">
					<a style="padding: 10px 8px;" href="javascript:void(0)" class="aui-list-product-item" v-for="item in productList" :key="item.num_iid" @click="goDetail(item)">
						<div class="aui-list-product-item-img" style="border-radius: 6px;height: 16em;">
							<img :src="item.pict_url" alt="">
						</div>
						<div class="aui-list-product-item-text">
							<h3>{{item.title}}</h3>
							<div class="aui-list-product-mes-box">
								<div>
									<span class="aui-list-product-item-price">
										<em>¥</em>
										{{item.zk_final_price}}
									</span>
								</div>
							</div>
							<div class="aui-list-product-mes-box">
								<div>
									<span class="aui-list-product-item-del-price">
										¥{{item.reserve_price}}
									</span>
								</div>
								<div class="aui-comment">{{item.nick}}</div>
							</div>
						</div>
					</a>
				</div>
			</section>
		</section>
	</section>
</div>
<footer class="aui-footer-default aui-footer-fixed">
	<a href="../index.html" class="aui-footer-item">
		<span class="aui-footer-item-icon aui-icon aui-footer-icon-home"></span>
		<span class="aui-footer-item-text">首页</span>
	</a>
	<a href="./class.html" class="aui-footer-item">
		<span class="aui-footer-item-icon aui-icon aui-footer-icon-class"></span>
		<span class="aui-footer-item-text">分类</span>
	</a>
	<a href="./find.html" class="aui-footer-item">
		<span class="aui-footer-item-icon aui-icon aui-footer-icon-find"></span>
		<span class="aui-footer-item-text">发现</span>
	</a>
	<a href="javascript:void(0);" class="aui-footer-item aui-footer-active">
		<span class="aui-footer-item-icon aui-icon aui-footer-icon-me"></span>
		<span class="aui-footer-item-text">我的</span>
	</a>
</footer>

	<script type="text/javascript" src="themes/js/jquery.min.js"></script>
	<script type="text/javascript" src="themes/vue2/vue.js"></script>
	<script type="text/javascript" src="themes/js/base.js"></script>

<script type="text/javascript">
    $(function () {
        //绑定滚动条事件
        //绑定滚动条事件
        $(window).bind("scroll", function () {
            var sTop = $(window).scrollTop();
            var sTop = parseInt(sTop);
            if (sTop >= 10) {
                if (!$("#scrollBg").is(":visible")) {
                    try {
                        $("#scrollBg").slideDown();
                    } catch (e) {
                        $("#scrollBg").show();
                    }
                }
            }
            else {
                if ($("#scrollBg").is(":visible")) {
                    try {
                        $("#scrollBg").slideUp();
                    } catch (e) {
                        $("#scrollBg").hide();
                    }
                }
            }
        });
    })

    var vue = new Vue({
        el: '#vue',
        data: {
            productList:[],
            items: 1,
            b:true,
			accountMobile:localStorage.getItem("mobile"),
			imageUrl:localStorage.getItem("imageUrl"),
        },
        created:function () {   //实例初始化创建完成执行
            this.getProductList();
            window.addEventListener('scroll', this.onScroll);
        },
        methods:{              //定义封装方法
            onScroll() {
                //可滚动容器的高度
                let innerHeight = document.querySelector('#vue').clientHeight;
                //屏幕尺寸高度
                let outerHeight = document.documentElement.clientHeight;
                //可滚动容器超出当前窗口显示范围的高度
                let scrollTop = document.body.scrollTop + document.documentElement.scrollTop;
                //scrollTop在页面为滚动时为0，开始滚动后，慢慢增加，滚动到页面底部时，出现innerHeight < (outerHeight + scrollTop)的情况，严格来讲，是接近底部。
                console.log(innerHeight + " " + outerHeight + " " + scrollTop);
                if ((innerHeight-110) < (outerHeight + scrollTop)) {
                    if(!this.b){
                        return;
                    }
                    //加载更多操作
                    console.log("loadmore："+this.items);
                    this.items += 1;
                    this.b = false;
                    this.getProductList();
                }
            },
            //获取列表
            getProductList:function () {
                var self = this;
                $.ajax({
                    type:"POST",
                    url:CTX+"/open/h5/tbk/getFavoritesProductList",
                    dataType:"JSON",
                    data:{
                        pageNo:self.items,
                        // fid:'19743926',  //选品库编号-精选美食库，查询编号接口：CTX+"/open/h5/tbk/getFavoritesList" 我的
                        fid:'19855463',  //选品库编号-精选美食库，查询编号接口：CTX+"/open/h5/tbk/getFavoritesList" 公共的-个人中心为你推荐
                    },
                    success:function(data){
                        if (data.code == 0) {
                            var list = self.productList;
                            var plist = data.data.tbk_uatm_favorites_item_get_response.results.uatm_tbk_item;
                            var arrList = list.concat(plist);
                            self.productList = arrList;
                            self.b = true;
                        } else {

                        }
                    }
                });
            },
            goDetail(item){

                window.location.href = item.item_url;

            },
			loginOut(){
				localStorage.setItem("imageUrl","");
				localStorage.setItem("nickname","");
				localStorage.setItem("accountId","");
				localStorage.setItem("mobile","");
				window.location.reload();
			}
        },
        watch:{     //监听器

        }

    })
</script>
</body>
</html>